<?php


namespace apps\marriage\app\mp\controller;

use apps\marriage\core\service\MemberRechargeRecordService;
use think\Request;

class MemberRechargeRecordController extends BaseMarriageMpController
{
    /**
     * @var MemberRechargeRecordService
     */
    private $memberRechargeRecordService;

    protected function init()
    {
        parent::init();
        $this->memberRechargeRecordService = service('MemberRechargeRecord', SERVICE_NAMESPACE);
    }

    public function info(Request $request)
    {
        $iid = $request->param('iid', 0, 'intval');
        $iidType = $request->param('iid_type', 0, 'intval');

        $data = $this->memberRechargeRecordService->info([
            'user_id' => $this->user['id'],
            'iid' => $iid,
            'iid_type' => $iidType
        ]);
        return $this->success([
            'record' => $data
        ]);
    }

}